import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import router from "./router/index.js";
import '../src/utils/rem.js'
import pinia from './stores'  //引入
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' // 持久化工具
import { ElementTiptapPlugin } from 'element-tiptap';

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

pinia.use(piniaPluginPersistedstate)

app.use(ElementPlus)
app.use(pinia)
app.use(router)
app.use(ElementTiptapPlugin, {
    lang: 'zh', // 设置语言为中文
})
app.mount('#app')
